<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="FlexTagLib" prefix="mm" %>   
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	pageContext.setAttribute("base",basePath);
%>
<html>	
	<head>
		<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> 
		<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"> 
		<META HTTP-EQUIV="Expires" CONTENT="0"> 

		<script type="text/javascript" src="${path}jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="${path}toolbox.flashembed.js"></script>
        <script type="text/javascript">
        	$(document).ready(function(){
        		//flashembed("uploader", "${path}/flex.swf");
        	});
        	function addPic(arr){
        		alert(arr[0][0]+" "+arr[0][1]);
        		alert(arr[1][0]+" "+arr[1][1]);
        		alert(arr[2][0]+" "+arr[2][1]);
        		//alert(name + " " + size+" ---ddd");
        		
        		var table = document.getElementById("mytable"); // 获取table
				
				for(var i=0;i<arr.length;i++){
					var row = table.insertRow(table.rows.length-1);
					var c = row.insertCell(-1);
					//c.setAtteibute("id",tr_id);
			        c.innerHTML = "<input/>"//name;
			        c = row.insertCell(-1);
			        c.innerHTML = "<input/>"//size;
			        c = row.insertCell(-1);
			        c.innerHTML = "<input/>"//"<a href='#' >删除</a>";
				}
		        
        	}
        	
        	function  delPic(){
        	
        	}
        	
        	function flv(){
        		document.upload.sss();
        	}
        </script>
   </head>
    <body>
          <div id="uploader"></div>

       	  <mm:mxml source="/flex_src/upload.mxml" width="50%" height="50%">
       	  </mm:mxml>
       	  <table id="mytable">
       	  	<thead>
       	  		<tr> <td>文件名</td>	<td>大小</td> <td>操作<a href="#" onclick="flv();">SSS</a></td></tr>
       	  	</thead>
       	  	<tbody>
       	  		<tr> <td>文件名11</td>	<td>大小</td> <td>操作</td></tr>
       	  	</tbody>
       	  </table>
   </body>
</html>
